3.2.97 \(\int \frac {c+d x}{x^3 (a+b x)} \, dx\)

Optimal. Leaf size=62 \[ \frac {b \log (x) (b c-a d)}{a^3}-\frac {b (b c-a d) \log (a+b x)}{a^3}+\frac {b c-a d}{a^2 x}-\frac {c}{2 a x^2} \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {77} \begin {gather*} \frac {b c-a d}{a^2 x}+\frac {b \log (x) (b c-a d)}{a^3}-\frac {b (b c-a d) \log (a+b x)}{a^3}-\frac {c}{2 a x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c + d*x)/(x^3*(a + b*x)),x]

[Out]

-c/(2*a*x^2) + (b*c - a*d)/(a^2*x) + (b*(b*c - a*d)*Log[x])/a^3 - (b*(b*c - a*d)*Log[a + b*x])/a^3

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rubi steps

\begin {align*} \int \frac {c+d x}{x^3 (a+b x)} \, dx &=\int \left (\frac {c}{a x^3}+\frac {-b c+a d}{a^2 x^2}-\frac {b (-b c+a d)}{a^3 x}+\frac {b^2 (-b c+a d)}{a^3 (a+b x)}\right ) \, dx\\ &=-\frac {c}{2 a x^2}+\frac {b c-a d}{a^2 x}+\frac {b (b c-a d) \log (x)}{a^3}-\frac {b (b c-a d) \log (a+b x)}{a^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 58, normalized size = 0.94 \begin {gather*} \frac {-\frac {a (a c+2 a d x-2 b c x)}{x^2}+2 b \log (x) (b c-a d)+2 b (a d-b c) \log (a+b x)}{2 a^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)/(x^3*(a + b*x)),x]

[Out]

(-((a*(a*c - 2*b*c*x + 2*a*d*x))/x^2) + 2*b*(b*c - a*d)*Log[x] + 2*b*(-(b*c) + a*d)*Log[a + b*x])/(2*a^3)

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {c+d x}{x^3 (a+b x)} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(c + d*x)/(x^3*(a + b*x)),x]

[Out]

IntegrateAlgebraic[(c + d*x)/(x^3*(a + b*x)), x]

________________________________________________________________________________________

fricas [A]  time = 1.20, size = 68, normalized size = 1.10 \begin {gather*} -\frac {2 \, {\left (b^{2} c - a b d\right )} x^{2} \log \left (b x + a\right ) - 2 \, {\left (b^{2} c - a b d\right )} x^{2} \log \relax (x) + a^{2} c - 2 \, {\left (a b c - a^{2} d\right )} x}{2 \, a^{3} x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/x^3/(b*x+a),x, algorithm="fricas")

[Out]

-1/2*(2*(b^2*c - a*b*d)*x^2*log(b*x + a) - 2*(b^2*c - a*b*d)*x^2*log(x) + a^2*c - 2*(a*b*c - a^2*d)*x)/(a^3*x^
2)

________________________________________________________________________________________

giac [A]  time = 1.06, size = 75, normalized size = 1.21 \begin {gather*} \frac {{\left (b^{2} c - a b d\right )} \log \left ({\left | x \right |}\right )}{a^{3}} - \frac {{\left (b^{3} c - a b^{2} d\right )} \log \left ({\left | b x + a \right |}\right )}{a^{3} b} - \frac {a^{2} c - 2 \, {\left (a b c - a^{2} d\right )} x}{2 \, a^{3} x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/x^3/(b*x+a),x, algorithm="giac")

[Out]

(b^2*c - a*b*d)*log(abs(x))/a^3 - (b^3*c - a*b^2*d)*log(abs(b*x + a))/(a^3*b) - 1/2*(a^2*c - 2*(a*b*c - a^2*d)
*x)/(a^3*x^2)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 75, normalized size = 1.21 \begin {gather*} -\frac {b d \ln \relax (x )}{a^{2}}+\frac {b d \ln \left (b x +a \right )}{a^{2}}+\frac {b^{2} c \ln \relax (x )}{a^{3}}-\frac {b^{2} c \ln \left (b x +a \right )}{a^{3}}-\frac {d}{a x}+\frac {b c}{a^{2} x}-\frac {c}{2 a \,x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)/x^3/(b*x+a),x)

[Out]

-1/2*c/a/x^2-1/a/x*d+1/a^2/x*b*c-1/a^2*b*ln(x)*d+1/a^3*b^2*ln(x)*c+1/a^2*b*ln(b*x+a)*d-1/a^3*b^2*ln(b*x+a)*c

________________________________________________________________________________________

maxima [A]  time = 1.09, size = 63, normalized size = 1.02 \begin {gather*} -\frac {{\left (b^{2} c - a b d\right )} \log \left (b x + a\right )}{a^{3}} + \frac {{\left (b^{2} c - a b d\right )} \log \relax (x)}{a^{3}} - \frac {a c - 2 \, {\left (b c - a d\right )} x}{2 \, a^{2} x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/x^3/(b*x+a),x, algorithm="maxima")

[Out]

-(b^2*c - a*b*d)*log(b*x + a)/a^3 + (b^2*c - a*b*d)*log(x)/a^3 - 1/2*(a*c - 2*(b*c - a*d)*x)/(a^2*x^2)

________________________________________________________________________________________

mupad [B]  time = 0.08, size = 73, normalized size = 1.18 \begin {gather*} -\frac {\frac {c}{2\,a}+\frac {x\,\left (a\,d-b\,c\right )}{a^2}}{x^2}-\frac {2\,b\,\mathrm {atanh}\left (\frac {b\,\left (a\,d-b\,c\right )\,\left (a+2\,b\,x\right )}{a\,\left (b^2\,c-a\,b\,d\right )}\right )\,\left (a\,d-b\,c\right )}{a^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d*x)/(x^3*(a + b*x)),x)

[Out]

- (c/(2*a) + (x*(a*d - b*c))/a^2)/x^2 - (2*b*atanh((b*(a*d - b*c)*(a + 2*b*x))/(a*(b^2*c - a*b*d)))*(a*d - b*c
))/a^3

________________________________________________________________________________________

sympy [B]  time = 0.49, size = 131, normalized size = 2.11 \begin {gather*} \frac {- a c + x \left (- 2 a d + 2 b c\right )}{2 a^{2} x^{2}} - \frac {b \left (a d - b c\right ) \log {\left (x + \frac {a^{2} b d - a b^{2} c - a b \left (a d - b c\right )}{2 a b^{2} d - 2 b^{3} c} \right )}}{a^{3}} + \frac {b \left (a d - b c\right ) \log {\left (x + \frac {a^{2} b d - a b^{2} c + a b \left (a d - b c\right )}{2 a b^{2} d - 2 b^{3} c} \right )}}{a^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/x**3/(b*x+a),x)

[Out]

(-a*c + x*(-2*a*d + 2*b*c))/(2*a**2*x**2) - b*(a*d - b*c)*log(x + (a**2*b*d - a*b**2*c - a*b*(a*d - b*c))/(2*a
*b**2*d - 2*b**3*c))/a**3 + b*(a*d - b*c)*log(x + (a**2*b*d - a*b**2*c + a*b*(a*d - b*c))/(2*a*b**2*d - 2*b**3
*c))/a**3

________________________________________________________________________________________